<%@ page language="java" contentType="text/html; charset=ISO-8859-15" pageEncoding="ISO-8859-15"%>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-bean" prefix="bean"%> 
<%@ taglib uri="http://jakarta.apache.org/struts/tags-html" prefix="html"%>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-logic" prefix="logic" %>
<%@ taglib uri="http://displaytag.sf.net/el" prefix="display" %>


<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-15">
<title></title>
</head>
<body>
<script type="text/javascript">

function modificaSolicitud(form){
	document.getElementById("form1").action="newSolicitudLlibre.do?action=modificaSolicitud";
	document.getElementById("form1").submit();
}

</script>

<h1>
	<bean:message key="label.title.resum.adquisicions" />
</h1>


<html:form styleId="form1" action="/newSolicitudLlibre?action=saveNewSolicitud">


<div id="tipusSol" class="form_box">
<h4>
	<bean:message key="label.title.tipusReserva" />
</h4>
	<fieldset>
		<html:radio styleId="tipus1"  property="tipusRadio"  value="br" onclick="tipusSol(1)" disabled="true" /> <bean:message  key="label.check.br" />
		<html:radio styleId="tipus2"  property="tipusRadio" value="grup" onclick="tipusSol(2)" disabled="true"/> <bean:message key="label.check.grupOrganizatiu" /> </br> 
		<html:radio styleId="tipus3"  property="tipusRadio" value="recerca" onclick="tipusSol(3)" disabled="true"/> <bean:message key="label.check.recerca" />
		<html:radio styleId="tipus4"  property="tipusRadio" value="desiderates" onclick="tipusSol(4)" disabled="true"/> <bean:message key="label.check.desiderates" />
	</fieldset> 
</div>

<div id="datosReservaBr" class="form_box">
<h4>
	<bean:message key="label.title.dadesReserva" />
</h4>
	<fieldset>
	<span class="form_field">
		<bean:message key="label.text.assignatura" />: 
		<bean:write name="newSolicitudForm" property="assignatura" />
	</span>
	<span class="form_field">
		<bean:message key="label.text.personaSolicitant" />: 
		<bean:write name="newSolicitudForm" property="personaSolicitant" />
	</span>
	</fieldset>
</div>

<div id="datosReservaGr" style="display:none; " class="form_box">
<h4>
	<bean:message key="label.title.dadesReserva" />
</h4>
	<fieldset>
	<span class="form_field">
		<bean:message key="label.text.centreResponsabilitat" />: 
		<bean:write name="newSolicitudForm" property="centreResponsabilitat" />
	</span>
	<span class="form_field">
		<bean:message key="label.text.personaSolicitant" />: 
		<bean:write name="newSolicitudForm" property="personaSolicitant1" />
	</span>
	</fieldset>
</div>

<div id="datosReservaRec" style="display:none; " class="form_box">
<h4>
	<bean:message key="label.title.dadesReserva" />
</h4>
	<fieldset>
	<span class="form_field">
		<bean:message key="label.text.centreResponsabilitat" />: 
		<bean:write name="newSolicitudForm" property="centreResponsabilitatRec" />
	</span>
	<span class="form_field">
		<bean:message key="label.text.codiProyecte" />: 
		<bean:write name="newSolicitudForm" property="codiProyecte" />
	</span></br>
	<span class="form_field">
		<bean:message key="label.text.codiOsrt" />: 
		<bean:write name="newSolicitudForm" property="codiOsrt" />
	</span>
	<span class="form_field">
		<bean:message key="label.text.personaSolicitant" />: 
		<bean:write name="newSolicitudForm" property="personaSolicitant2" />
	</span>
	</fieldset>
</div>

<div id="datosReservaDes" style="display:none; " class="form_box">
<h4>
	<bean:message key="label.title.dadesReserva" />
</h4>
	<fieldset>
		<bean:message key="label.text.personaSolicitant" />: 
		<bean:write name="newSolicitudForm" property="personaSolicitant3" />
		
		<bean:message key="label.text.perfilUOC" />:	
		<bean:write name="newSolicitudForm" property="perfilUOC" />
	</fieldset>
</div>
<!-- 
<div id="tipusSol" class="form_box">
<h4>
	<bean:message key="label.title.notificacioMail" />
</h4>
	<fieldset>
		<html:checkbox styleId="notificacioMailCheck" property="checkNotificacio" disabled="true"/> <bean:message key="label.label.notificacioMail.si" />  
	</fieldset>	 
</div>
 -->

<div id="divLlibres" class="form_box">
<h4>
	<bean:message key="label.title.resum.llibres" />
</h4>
		<logic:notEmpty name="newSolicitudForm" property="llibres">
				 
				 <logic:iterate name="newSolicitudForm" property="llibres" id="llibre">
							<fieldset>
							<table>	
								<tr>
									<td>
						 				<bean:message key="label.text.titol" />: <bean:write name="llibre" property="titol" />
									</td>
									<td>
						 				<bean:message key="label.text.autor" />: <bean:write name="llibre" property="autor" />
						 			</td>
					 			</tr>
					 			<tr>
									<td>
						 				<bean:message key="label.text.editorial" />: <bean:write name="llibre" property="editorial" />  
									</td>
									<td>
						 				<bean:message key="label.text.isbn" />: <bean:write name="llibre" property="isbn" />
						 			</td>
					 			</tr>
					 			<tr>
									<td>
						 				<bean:message key="label.text.lloc" />: <bean:write name="llibre" property="lloc" />  
									</td>
									<td>
						 				<bean:message key="label.text.any" />: <bean:write name="llibre" property="any" />
						 			</td>
					 			</tr>
					 			<tr>
									<td>
						 				<bean:message key="label.text.edicio" />: <bean:write name="llibre" property="edicio" />
									</td>
									<td>
						 				<bean:message key="label.text.nexemplars" />: <bean:write name="llibre" property="nexemplars" />
						 			</td>
					 			</tr>
					 			<tr>
									<td>
						 				<bean:message key="label.text.preu" />: <bean:write name="llibre" property="preu" />
									</td>
									<td>
						 				<bean:message key="label.text.tipusEnvio" />: <bean:write name="llibre" property="tipoEnvio" />
						 			</td>
					 			</tr>
					 			<tr>
									<td>
						 				<bean:message key="label.text.url" />: <bean:write name="llibre" property="url" />
									</td>
									<td>
						 				<bean:message key="label.text.observacions" />: <bean:write name="llibre" property="observacions" />
						 			</td>
					 			</tr>
				 			</table>
				 			</fieldset>	 
				 </logic:iterate>
 		
		</logic:notEmpty>
		
	
</div>

<div style="width:100%;">
	<div id="divButtons" >	
		<html:button styleId="procesa2" property="modifica" onclick="modificaSolicitud(this);return false;" >  <bean:message key="label.button.modificaSolicitud" /> </html:button>
	</div>
	<div id="divButtons">
		<html:submit styleId="procesa3">  <bean:message key="label.button.confirmaSolicitud" /> </html:submit>
	</div>
</div>

<!-- <div style="width:100%;padding-top:15px;">
    <a href="Adquisicio.do?method=menuLlibre" title="Home">Pas 1</a> >> <a href="newSolicitudLlibre.do?action=modificaSolicitud" title="Home">Pas 2</a> >> <a href="#" title="Home"> Pas 3 </a>
</div> -->

<div id="breadcrumb" class="clearfix">
    Pas 1 >> Pas 2 >> <b class="breadcrumb_pas">Pas 3</b>
</div>



<!-- Control si hay algun tipo de reserva seleccionado -->

<logic:equal name="newSolicitudForm" property="tipusRadio" value="br">
	<script type="text/javascript">
		
	document.getElementById("tipus1").checked=true;
	</script>
</logic:equal>
<logic:equal name="newSolicitudForm" property="tipusRadio" value="grup">
	<script type="text/javascript">
		
	document.getElementById("tipus2").checked=true;
	</script>
</logic:equal>
<logic:equal name="newSolicitudForm" property="tipusRadio" value="recerca">
	<script type="text/javascript">
	
		document.getElementById("tipus3").checked=true;
	</script>
</logic:equal>
<logic:equal name="newSolicitudForm" property="tipusRadio" value="desiderates">
	<script type="text/javascript">
		
		document.getElementById("tipus4").checked=true;
	</script>
</logic:equal>

</html:form>

<script type="text/javascript">
	
testTipusSol();
	
</script>

</body>
</html>